<template>
	<view @click="gotosearch" class="search_content" :style="{'background-color': bgcolor}">
		<view class="search_box" :style="{'border-radius': radius + 'px'}">
			<icon type="search" size="15"/>
			<text class="search_text">搜索</text>
		</view>
	</view>
</template>

<script>
	export default {
		name:"my-search",
		data() {
			return {
				
			};
		},
		props: {
			bgcolor: {
				type: String,
				default: '#C00000'
			},
			radius: {
				type: Number,
				default: 18
			}
		},
		methods: {
			gotosearch () {
				console.log('...............')
				this.$emit('my-click')
			}
		}
	}
</script>

<style lang="scss">
.search_content {
	height: 50px;
	// background-color: #C00000;
	display: flex;
	align-items: center;
	padding: 0 10px;
	.search_box {
		height: 36px;
		background-color: #FFFFFF;
		// border-radius: 18px;
		width: 100%;
		display: flex;
		align-items: center;
		justify-content: center;
		.search_text {
			font-size: 12px;
			margin-left: 5px;
		}
	}
}
</style>
